What you'll need.
- A computer. It doesn't have to be too fast, as MP3 streaming
isn't CPU-intensive: any kind of Power Mac (or iMac) or Pentium PC
should suffice. It probably needs at least 32MB of RAM. (The app
itself will use about 5MB on Mac OS.)
- A high speed TCP/IP net connection. Anything better than a
regular modem: DSL or cable-modem will do. Or you can use Ethernet
to stream to your local area network.
- A Java 1.1+ runtime for your OS (such as Sun's
JRE or Apple's
MRJ.)
- A collection of MP3-format audio files. Make sure they are not
variable-bit-rate encoded, they all have the same bit-rate, and
that the bit-rate is comfortably less than the maximum upload
speed of your Internet connection.
E-Z setup for the impatient.
If you want to get started right away, just do the
following. But note that you probably don't want to really serve any
streams to other people without doing a bit more setup, as described
in the next section.
- Download the binary distribution (presumably you've already
done this if you're reading this file!)
- Put the MP3 files you want to stream into the "MP3s" folder.
It's fine to use subfolders. Also, you can add files later on even
if the server is already running.
- Launch RadioStation:
- On Mac OS, simply double-click the RadioStation
application icon.
- On other platforms, you may be able to simply
double-click the "RadioStation.jar" file, if the version of
Java installed understands how to launch Jar files.
(JDK 1.2 and later support this.)
- Otherwise, you'll to use a command-line shell to go to the
RadioStation directory and enter a command like "jre
-cp Radio.jar com.apple.jens.radio.Radio".
- The text console will display status information, including a
message saying that your channel is now running.
- That's it! The server will run forever, waiting for incoming
connections, until you quit it. (On Mac OS, use the Quit menu
command. On Windows or Unix, pressing Control-C from the command
line should do it.)
- To connect, launch a streaming-capable MP3 player on the same
or another machine and connect to port 8000 on the machine running
the server (you'd type in the IP address of the server followed by
":8000".)
All is fine and dandy ... except that you haven't configured any
of the info about your station, like its name and genre. These happen
to default to "Polkacide!" and "Polka" respectively, so you
might want to edit them. Also, you might want to stream more
than one channel, or put the MP3 files somewhere else, or generate a
web page with a playlist. Read on.
How to configure stations.
The station(s) are configured by means of text files in the
"Stations" folder: one per station. The name of the file is ignored,
but for your own sake you'll want to give it a name that matches the
station's name. Each file is a standard Java properties file
consisting of lines of the form "name=value", where
name is the name of a property and value is its value.
(Lines starting with "#" are ignored.)
If you have multiple stations, make a copy of "ExampleStation" for
each extra station you want, then rename them.
Then open each station file in a text editor (like SimpleText or
notepad or emacs) and edit a few properties. There is full
documentation on all the different
properties, but the basic properties you need to set are:
- Set "name" and "genre" to the name
and musical genre of your station.
- Set "home-page" to a URL pointing to a web page for
the station (or remove this line if you don't have one.)
- Change "host" to your name (or whatever kewl DJ
pseudonym you go by), and "host-url=" to a URL to your
e-mail address (use a "mailto:" URL) or your home
page.
- If you're setting up more than one station, change
"port" to a different value than the default 8000 -- each
station needs a unique port number to use. A good approach is to
use consecutive numbers starting from 8000.
- If the station's MP3 files will not be stored in the "MP3s"
folder, change "FileDJ.music-director.home" to the
file path to the directory containing the station's MP3
files. On Mac OS, use a Unix-style path with "/" separators; on
other operating systems use whatever the native path syntax is.
You can use a relative path: the starting point is the directory
containing the application.
- Shuffle play is on by default. If you want the tracks played
in alphabetical order instead, change the value of
"FileDJ.music-director" from
"ShuffleMusicDirector" to
"SequentialMusicDirector".
- If you want an HTML-format playlist to be generated, set
"html-playlist.dst" to a file path to the location and name of the
playlist file. (Presumably you'll choose a location that's being
served by a web server running on this machine.)
After any changes to station files, you'll need to restart the
server. If there are problems with a station file (like an incorrect
directory path) you'll get an error message and the server will quit.
Fix the station file and start the server again.